<!DOCTYPE html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'productoPedido.label', default: 'ProductoPedido')}" />
		<title><g:message code="default.create.label" args="[entityName]" /></title>
	</head>
	<body>		
		<div id="create-productoPedido" class="content scaffold-create" role="main">
			<div class="panel panel-primary">
				<div class="panel-heading">
					<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <g:message code="default.create.label" args="[entityName]" /></h3>
				</div>
				<div class="panel-body">
					<div class="row">
						<div class="col-lg-12">
							<g:if test="${flash.message}">
							<div class="message" role="status">${flash.message}</div>
							</g:if>
							<g:hasErrors bean="${productoPedidoInstance}">
							<ul class="errors" role="alert">
								<g:eachError bean="${productoPedidoInstance}" var="error">
								<li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
								</g:eachError>
							</ul>
							</g:hasErrors>
							<g:form url="[resource:productoPedidoInstance, action:'save']" >
								<fieldset class="form">
									<div class="form-group fieldcontain ${hasErrors(bean: productoPedidoInstance, field: 'producto', 'error')} required">
										<label for="producto">
											<g:message code="productoPedido.producto.label" default="Producto" />
											<span class="required-indicator">*</span>
										</label>
										<div class="input-group input-group">
											<span class="input-group-addon"><i class="fa fa-search"></i></span>
											<g:select id="producto" name="producto.id" from="${kioscodeal.Producto.list()}" optionKey="id" required="" optionValue="titulo" value="${productoPedidoInstance?.producto?.id}" class="many-to-one form-control" placeholder="Producto"/>		
										</div>
									</div>
									
									<div class="form-group fieldcontain ${hasErrors(bean: productoPedidoInstance, field: 'cantidad', 'error')} required">
										<label for="cantidad">
											<g:message code="productoPedido.cantidad.label" default="Cantidad" />
											<span class="required-indicator">*</span>
										</label>
										<div class="input-group input-group">
											<span class="input-group-addon"><i class="fa fa-edit"></i></span>
											<g:field name="cantidad" type="number" min="0" value="${productoPedidoInstance.cantidad}" required="" class="form-control" placeholder="Cantidad"/>
										</div>
									</div>
									
								</fieldset>
								<fieldset class="buttons">
									<div class="col-lg-2">
									</div>
									<div class="col-lg-3">
										<g:submitButton name="Guardar" class="saveCompra" value="${message(code: 'default.button.create.label', default: 'Guardar')}" />
									</div>									
									<div class="col-lg-7">
									</div>
								</fieldset>
							</g:form>
						</div>
					</div>
				</div>
			</div>		
		</div>			
	</body>
</html>